const _debounce = (fn, time) => {
  time = time || 500
  let timer = null
  return function() {
    if (timer) {
      window.clearTimeout(timer)
    }
    timer = window.setTimeout(() => {
      fn(arguments)
    }, time)
  }
}

export { _debounce }
